package com.androidhive.jsonparsing;


import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class DashboardMain extends Activity {
    
	  @Override
	  public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dashboard_layout);

		
	    // Dashboard News feed button
        Button btn_newsfeed = (Button) findViewById(R.id.home_btn_schedule);
        
        // Dashboard Friends button
        Button btn_friends = (Button) findViewById(R.id.home_btn_map);
        
        // Dashboard Messages button
        Button btn_messages = (Button) findViewById(R.id.home_btn_sessions);
        
        // Dashboard Places button
        Button btn_places = (Button) findViewById(R.id.home_btn_starred);
           
        /**
         * Handling all button click events
         * */
        
        // Listening to News Feed button click
        btn_newsfeed.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				 Intent i = new Intent(DashboardMain.this, dk.mitaffald.database.CountryList.class);
	             startActivity(i);

			}
		});
        
       // Listening Friends button click
        btn_friends.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				Intent i = new Intent(getApplicationContext(), LocationBased.class);
				startActivity(i);
			}
		});
        
        // Listening Messages button click
        btn_messages.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				Intent i = new Intent(getApplicationContext(), dk.facebook.wall.TestConnect.class);
				startActivity(i);
			}
		});
        
        // Listening to Places button click
        btn_places.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {

				Intent i = new Intent(getApplicationContext(), CatAbc.class);
				startActivity(i);

			}
        });
    }
}